<html>
<head>
<!--
Implementing a dropbox service with the Blobstore API (part 3): 
http://blog.notdot.net/2010/04/Implementing-a-dropbox-service-with-the-Blobstore-API-part-3
upload3.html
-->
  <meta http-equiv="content-type" content="text/html; charset=utf-8"/>
  <title>File Hangar: Upload file</title>
<style type="text/css">@import url(/static/plupload/js/jquery.plupload.queue/css/jquery.plupload.queue.css);</style>
<script type="text/javascript" src="http://www.google.com/jsapi"></script>
<script type="text/javascript">google.load("jquery", "1.5.1");</script>

<!--<script type="text/javascript" src="/static/plupload/plupload.full.min.js"></script>-->
<script type="text/javascript" src="/static/plupload/gears_init.js"></script>
<script type="text/javascript" src="/static/plupload/js/plupload.full.js"></script>
<script type="text/javascript" src="/static/plupload/js/jquery.plupload.queue/jquery.plupload.queue.js"></script>

<script type="text/javascript">
    $(function() {
      uploader = $("#uploader").pluploadQueue({
        runtimes: 'flash,html5,gears,html4'
      }).pluploadQueue();
      uploader.bind('UploadFile', function(up, file) {
        $.ajax({
            url: '/generate_upload_url',
            async: false,
            success: function(data) {
              up.settings.url = data;
            },
        });
      });
    });
</script>
</head>

<body>
  <p style="float: right"><a href="{{logout_url}}">Log Out</a></p>
  <h1>Upload a file to App Engine File Hangar</h1>
        <form>
                <div id="uploader">
                </div>
        </form>
</body>
</html>